<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 面试题：
      // 闭包：内层函数引用外层函数中的变量的集合
      // 闭包=内层函数+外层函数的变量
      function out() {
        let a = 10
        function innner() {
          console.log(a)
        }
        innner()
      }
      out()
    </script>
  </body>
</html>
